<?php
include('include/config.inc.php');
class search
{
  public $category    = 1;
  public $subCategory = 1;
  public $item        = 1;
  public $customer    = 1;
  public $outcome     = 1;
  public $categoryFields = "abc,xyz";
  
  
  function searchwise()
  {
    if($this->category == 1)
    {
      $this->searchCat();
    }
    if($this->subCategory == 1)
    {
      $this->searchSubCat();
    }
    if($this->item == 1)
    {
      $this->searchItem();
    }
    if($this->customer == 1)
    {
      $this->searchCustomer();
    }
    if($this->outcome == 1)
    {
      $this->searchOutcome();
    }
  }
  function searchFrom($table,$searchValue)
  {
    for($i = 0; $i < count($table); $i++)
    {
      if($table[$i] == "category")
      {
        $this->searchCatgory($searchValue);
      }
      if($table[$i] == "subCategory")
      {
        $this->searchSubCatgory($searchValue);
      }
      if($table[$i] == "item")
      {
        $this->searchItem($searchValue);
      }
      if($table[$i] == "customer")
      {
        $this->searchCustomer($searchValue);
      }
      if($table[$i] == "outcome")
      {
        $this->searchOutcome($searchValue);
      }
    }
  }
  
  function searchCatgory($value)
  {
    
  }
}
?>
